package com.bjqh.edu.Bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Administrator on 2017/10/9.
 */

public class HistoricalGrade implements Parcelable {

    /**
     * total : 6
     * status : 200
     * rows : [{"total":null,"id":3,"time":1508342400000,"gradeName":"9年级","page":null,"score":80,"rows":null,"courseName":"政治"},{"total":null,"id":4,"time":1506873600000,"gradeName":"9年级","page":null,"score":100,"rows":null,"courseName":"政治"},{"total":null,"id":5,"time":1506787200000,"gradeName":"9年级","page":null,"score":60,"rows":null,"courseName":"生物"},{"total":null,"id":6,"time":1506787200000,"gradeName":"7年级","page":null,"score":1,"rows":null,"courseName":"化学"}]
     */

    private int total;
    private int status;
    private List<RowsBean> rows;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private  String msg;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<RowsBean> getRows() {
        return rows;
    }

    public void setRows(List<RowsBean> rows) {
        this.rows = rows;
    }

    public static class RowsBean implements Parcelable {
        /**
         * total : null
         * id : 3
         * time : 1508342400000
         * gradeName : 9年级
         * page : null
         * score : 80.0
         * rows : null
         * courseName : 政治
         */

        private String total;
        private int id;
        private long time;
        private String gradeName;
        private String page;
        private String score;
        private String rows;
        private String courseName;

        public String getTotal() {
            return total;
        }

        public void setTotal(String total) {
            this.total = total;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public long getTime() {
            return time;
        }

        public void setTime(long time) {
            this.time = time;
        }

        public String getGradeName() {
            return gradeName;
        }

        public void setGradeName(String gradeName) {
            this.gradeName = gradeName;
        }

        public String getPage() {
            return page;
        }

        public void setPage(String page) {
            this.page = page;
        }

        public String getScore() {
            return score;
        }

        public void setScore(String score) {
            this.score = score;
        }

        public String getRows() {
            return rows;
        }

        public void setRows(String rows) {
            this.rows = rows;
        }

        public String getCourseName() {
            return courseName;
        }

        public void setCourseName(String courseName) {
            this.courseName = courseName;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.total);
            dest.writeInt(this.id);
            dest.writeLong(this.time);
            dest.writeString(this.gradeName);
            dest.writeString(this.page);
            dest.writeString(this.score);
            dest.writeString(this.rows);
            dest.writeString(this.courseName);
        }

        public RowsBean() {
        }

        protected RowsBean(Parcel in) {
            this.total = in.readString();
            this.id = in.readInt();
            this.time = in.readLong();
            this.gradeName = in.readString();
            this.page = in.readString();
            this.score = in.readString();
            this.rows = in.readString();
            this.courseName = in.readString();
        }

        public static final Parcelable.Creator<RowsBean> CREATOR = new Parcelable.Creator<RowsBean>() {
            @Override
            public RowsBean createFromParcel(Parcel source) {
                return new RowsBean(source);
            }

            @Override
            public RowsBean[] newArray(int size) {
                return new RowsBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.total);
        dest.writeInt(this.status);
        dest.writeTypedList(this.rows);
        dest.writeString(this.msg);
    }

    public HistoricalGrade() {
    }

    protected HistoricalGrade(Parcel in) {
        this.total = in.readInt();
        this.status = in.readInt();
        this.rows = in.createTypedArrayList(RowsBean.CREATOR);
        this.msg = in.readString();
    }

    public static final Parcelable.Creator<HistoricalGrade> CREATOR = new Parcelable.Creator<HistoricalGrade>() {
        @Override
        public HistoricalGrade createFromParcel(Parcel source) {
            return new HistoricalGrade(source);
        }

        @Override
        public HistoricalGrade[] newArray(int size) {
            return new HistoricalGrade[size];
        }
    };
}
